package task;

public class Task6_2 {
    public static int add(int[] array){
        int sum = 0;
        for (int i = 0; i < array.length; i++) {
            sum += array[i];
        }
        return sum;
    }
    public static void main(String[] args) {
        int[] array = {1,2,3,4,5};
        System.out.println(add(array));
    }
}
